﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMsaster.master" AutoEventWireup="true" CodeFile="AmeManage.aspx.cs" Inherits="Admin_AmeManage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
       <script src="assets/js/jquery-1.10.2.js"></script>
    <!-- Bootstrap Js -->
    <script src="assets/js/bootstrap.min.js"></script>
    <!-- Metis Menu Js -->
    <script src="assets/js/jquery.metisMenu.js"></script>
    <!-- DATA TABLE SCRIPTS -->
    <script src="assets/js/dataTables/jquery.dataTables.js"></script>
   
    <script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
    <script src="assets/js/model.js"></script>
    <!-- Custom Js -->
    <script src="assets/js/custom-scripts.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">



    

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>" DeleteCommand="DELETE FROM [Amerce] WHERE [AmerceID] = @AmerceID" InsertCommand="INSERT INTO [Amerce] ([AmerceID], [Amerce], [AmerceType], [ADate], [ABookID], [AReader], [AUserID], [Areason], [Amemo]) VALUES (@AmerceID, @Amerce, @AmerceType, @ADate, @ABookID, @AReader, @AUserID, @Areason, @Amemo)" SelectCommand="SELECT * FROM [Amerce]" UpdateCommand="UPDATE [Amerce] SET [Amerce] = @Amerce, [AmerceType] = @AmerceType, [ADate] = @ADate, [ABookID] = @ABookID, [AReader] = @AReader, [AUserID] = @AUserID, [Areason] = @Areason, [Amemo] = @Amemo WHERE [AmerceID] = @AmerceID">
        <DeleteParameters>
            <asp:Parameter Name="AmerceID" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="AmerceID" Type="String" />
            <asp:Parameter Name="Amerce" Type="String" />
            <asp:Parameter Name="AmerceType" Type="String" />
            <asp:Parameter Name="ADate" Type="String" />
            <asp:Parameter Name="ABookID" Type="String" />
            <asp:Parameter Name="AReader" Type="String" />
            <asp:Parameter Name="AUserID" Type="String" />
            <asp:Parameter Name="Areason" Type="String" />
            <asp:Parameter Name="Amemo" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Amerce" Type="String" />
            <asp:Parameter Name="AmerceType" Type="String" />
            <asp:Parameter Name="ADate" Type="String" />
            <asp:Parameter Name="ABookID" Type="String" />
            <asp:Parameter Name="AReader" Type="String" />
            <asp:Parameter Name="AUserID" Type="String" />
            <asp:Parameter Name="Areason" Type="String" />
            <asp:Parameter Name="Amemo" Type="String" />
            <asp:Parameter Name="AmerceID" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>" SelectCommand="SELECT [PublishCompanyID], [PublishCompanyName] FROM [Publish_company]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>" SelectCommand="SELECT [BookType], [TypeName] FROM [Book_Type]"></asp:SqlDataSource>
    <div id="page-wrapper">
        <div id="page-inner">
            <div class="row">
                <div class="col-md-12">
                    <h1 class="page-header">图书类别管理<small> 在这里您可以管理所有图书的类别</small>
                    </h1>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <!-- Advanced Tables -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2>*图书条目目录</h2>
                        </div>
                        <hr />

                        <div class="panel-body">
                            <div class="panel-heading">
                            </div>
                            <div class="table-responsive">
                                <!-- 数据源开始 -->

                                <asp:GridView ID="mybookdata" class="mytablestyle table table-striped table-bordered table-hover" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="AmerceID">
                                    <Columns>
                                        <asp:CommandField ShowEditButton="True" />
                                        <asp:CommandField ShowDeleteButton="True" />
                                        <asp:BoundField DataField="AmerceID" HeaderText="流水单号" ReadOnly="True" SortExpression="AmerceID" />
                                        <asp:BoundField DataField="Amerce" HeaderText="罚款金额" SortExpression="Amerce" />
                                        <asp:BoundField DataField="AmerceType" HeaderText="罚款类型" SortExpression="AmerceType" />
                                        <asp:BoundField DataField="ADate" HeaderText="罚款日期" SortExpression="ADate" />
                                        <asp:BoundField DataField="ABookID" HeaderText="相关图书编号" SortExpression="ABookID" />
                                        <asp:BoundField DataField="AReader" HeaderText="相关读者编号" SortExpression="AReader" />
                                        <asp:BoundField DataField="AUserID" HeaderText="操作人" SortExpression="AUserID" />
                                        <asp:BoundField DataField="Areason" HeaderText="罚款理由" SortExpression="Areason" />
                                    </Columns>
                                </asp:GridView>
                                <!-- 数据源结束 -->
                                <br />
                                <script> window.onload = function asdasd() {
     $("#ContentPlaceHolder1_mybookdata tr:first").wrap("<thead></thead>");
     $("#ContentPlaceHolder1_mybookdata thead").insertBefore("#GriView1 tbody");
     $("#ContentPlaceHolder1_mybookdata").dataTable();
 }</script>
                            </div>

                        </div>


                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>" SelectCommand="SELECT [AmerceTypeID], [AmerceName] FROM [Amerce_info]"></asp:SqlDataSource>





                        <!-- 按钮触发模态框 -->




               





               














                        <!--End Advanced Tables -->
                    </div>

                </div>
                <!-- /. ROW  -->



            </div>

            <!-- /. PAGE INNER  -->
        </div>
        <script>
            function loadtable() {
                $("#ContentPlaceHolder1_mybookdata tr:first").wrap("<thead></thead>");
                $("#ContentPlaceHolder1_mybookdata thead").insertBefore("#GriView1 tbody");
                $("#ContentPlaceHolder1_mybookdata").dataTable();
            };
        </script>

</asp:Content>

